#ifndef _MEGA_PLAYER_H_
#define _MEGA_PLAYER_H_

#include "GameObject.h"
#include "Globals.h"
#include "IEventsHandler.h"

#include <SFML/Graphics/CircleShape.hpp>
#include <SFML/Window/Keyboard.hpp>
#include <SFML/Window/Mouse.hpp>

namespace mega
{

// forward declarations
class DummyWeapon;

class Player
	: public GameObject
	, public IEventsHandler
{
public:
	Player();
	virtual ~Player();
	
	Player(const Player & _rhs);
	Player & operator=(const Player & _rhs);

public:
	virtual void updateState();
	virtual void shoot(const Position & _direction);

	// game object interface
	virtual void render(RenderTarget & _target);
	virtual void move(const Position & _offset);

	// events handler interface
	bool onKeyPressed (const sf::Keyboard::Key & _key);
	bool onKeyReleased(const sf::Keyboard::Key & _key);
	bool onMousePressed (const sf::Mouse::Button & _button, const Position & _pos);
	bool onMouseReleased(const sf::Mouse::Button & _button, const Position & _pos);

private:
	sf::CircleShape    m_shape;
	float              m_velocity;
	MovingDirections   m_moving;
	DummyWeapon      * m_weapon;
};

}

#endif // _MEGA_PLAYER_H_
